$(document).ready(function(){
	$(".itemRows").each(function(idx, item){
		$(item).mouseenter(function(event){
			$(item).css("background-color", "#fdeada");
		}).mouseleave(function(event){
			$(item).css("background-color", "#fff");
		});
	});

	$(":input[name='detailBtn']").each(function(idx, item){
		$(item).on("click", function(event){
			var fields = $(item).parent("td").parent("tr").find(">td");
			var usrId = $(fields).eq(1).text();
			var usrNm = $(fields).eq(2).text();
			var options = new Object();
			options["url"] = "/template/system/userInfo/_detail/"+usrId;
			options["jqwId"] = "detailJqwPop";
			options["jqwType"] = "popup";
			options["title"] = "["+usrNm+"] 상세 정보";
			options["titleFontColor"] = "";
			options["resizable"] = false;
			options["width"] = "500";
			options["height"] = "310";
			jqwOpen(options);
		});
	});
	
	$(".sendEmail").each(function(idx, item){
		$(item).on("click", function(event){
			var fields = $(item).parent("td").parent("tr").find(">td");
			var usrId = $(fields).eq(1).text();
			var address = $(fields).eq(3).text();
			var options = new Object();
			options["url"] = "/template/system/userInfo/_sendMailForm/"+usrId;
			options["jqwId"] = "emailJqwPop";
			options["title"] = "To: "+address;
			options["titleFontColor"] = "#b9b9b9";
			options["resizable"] = false;
			options["width"] = "500";
			options["height"] = "310";
			jqwOpen(options);
		});
	});
	
	$(":input[name='reviseBtn']").each(function(idx, item){
		$(item).on("click", function(event){
			var fields = $(item).parent("td").parent("tr").find(">td");
			var usrId = $(fields).eq(1).text();
			var usrNm = $(fields).eq(2).text();
			var options = new Object();
			options["url"] = "/template/system/userInfo/_regFormRevise/"+usrId;
			options["jqwId"] = "reviseJqwPop";
			options["title"] = "["+usrNm+"] 사용자 수정";
			options["titleFontColor"] = "";
			options["resizable"] = false;
			options["width"] = "500";
			options["height"] = "330";
			jqwOpen(options);
		});
	});

});
